<?php
/**
 * Created by PhpStorm.
 * User: xhkj
 * Date: 2018/7/11
 * Time: 上午11:01
 */

namespace globalunit\utils;

class KeysUtil
{

    public static function get_user_main_key($uid)
    {
        $GAMENAME =  $GLOBALS['GAMENAME'];
        $key = $GAMENAME . ":user:" . $uid;
        return $key;
    }

    public static function get_main_usermap($uid)
    {
        $GAMENAME =  $GLOBALS['GAMENAME'];
        $key = $GAMENAME . ":usermap:" . $uid;
        return $key;
    }

    public static function get_main_token($uid)
    {
        $GAMENAME =  $GLOBALS['GAMENAME'];
        $key = $GAMENAME . ":token:" . $uid;
        return $key;
    }

    public static function get_phonecode_key($phone)
    {
        $GAMENAME =  $GLOBALS['GAMENAME'];
        $key = $GAMENAME . ":phonecode:" . $phone;
        return $key;
    }

}
